<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Rails::API::Task</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" />
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            Rails::API::Task 
            
                <span class="parent">&lt; 
                    
                    RDoc::Task
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../../files/railties/lib/rails/api/task_rb.html">railties/lib/rails/api/task.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-i-api_main">api_main</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>C</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-i-configure_rdoc_files">configure_rdoc_files</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>D</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-i-desc">desc</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>L</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-i-load_and_configure_sdoc">load_and_configure_sdoc</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>S</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Task.html#method-i-setup_horo_variables">setup_horo_variables</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">RDOC_FILES</td>
            <td>=</td>
            <td class="attr-value">{
'activesupport' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
lib/active_support/**/*.rb
),
:exclude =&gt; 'lib/active_support/vendor/*'
},

'activerecord' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
lib/active_record/**/*.rb
),
:exclude =&gt; 'lib/active_record/vendor/*'
},

'activemodel' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
lib/active_model/**/*.rb
)
},

'actionpack' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
lib/abstract_controller/**/*.rb
lib/action_controller/**/*.rb
lib/action_dispatch/**/*.rb
lib/action_view/**/*.rb
),
:exclude =&gt; 'lib/action_controller/vendor/*'
},

'actionmailer' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
lib/action_mailer/**/*.rb
),
:exclude =&gt; 'lib/action_mailer/vendor/*'
},

'railties' =&gt; {
:include =&gt; %w(
README.rdoc
CHANGELOG.md
MIT-LICENSE
lib/**/*.rb
),
:exclude =&gt; 'lib/rails/generators/rails/**/templates/**/*.rb'
}
}</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
      </table>
    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(name)
            
            <a href="Task.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L65" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">super</span>

  <span class="ruby-comment"># Every time rake runs this task is instantiated as all the rest.</span>
  <span class="ruby-comment"># Be lazy computing stuff to have as light impact as possible to</span>
  <span class="ruby-comment"># the rest of tasks.</span>
  <span class="ruby-identifier">before_running_rdoc</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">load_and_configure_sdoc</span>
    <span class="ruby-identifier">configure_rdoc_files</span>
    <span class="ruby-identifier">setup_horo_variables</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-api_main">
            
              <b>api_main</b>()
            
            <a href="Task.html#method-i-api_main" name="method-i-api_main" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-api_main_source')" id="l_method-i-api_main_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L120" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-api_main_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 120</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">api_main</span>
  <span class="ruby-identifier">component_root_dir</span>(<span class="ruby-string">'railties'</span>) <span class="ruby-operator">+</span> <span class="ruby-string">'/RDOC_MAIN.rdoc'</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-configure_rdoc_files">
            
              <b>configure_rdoc_files</b>()
            
            <a href="Task.html#method-i-configure_rdoc_files" name="method-i-configure_rdoc_files" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-configure_rdoc_files_source')" id="l_method-i-configure_rdoc_files_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L99" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-configure_rdoc_files_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 99</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">configure_rdoc_files</span>
  <span class="ruby-identifier">rdoc_files</span>.<span class="ruby-identifier">include</span>(<span class="ruby-identifier">api_main</span>)

  <span class="ruby-constant">RDOC_FILES</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">component</span>, <span class="ruby-identifier">cfg</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">cdr</span> = <span class="ruby-identifier">component_root_dir</span>(<span class="ruby-identifier">component</span>)

    <span class="ruby-constant">Array</span>(<span class="ruby-identifier">cfg</span>[<span class="ruby-value">:include</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pattern</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">rdoc_files</span>.<span class="ruby-identifier">include</span>(<span class="ruby-node">&quot;#{cdr}/#{pattern}&quot;</span>)
    <span class="ruby-keyword">end</span>

    <span class="ruby-constant">Array</span>(<span class="ruby-identifier">cfg</span>[<span class="ruby-value">:exclude</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pattern</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">rdoc_files</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-node">&quot;#{cdr}/#{pattern}&quot;</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-desc">
            
              <b>desc</b>(description)
            
            <a href="Task.html#method-i-desc" name="method-i-desc" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Hack, ignore the desc calls performed by the original initializer.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-desc_source')" id="l_method-i-desc_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L79" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-desc_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 79</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">desc</span>(<span class="ruby-identifier">description</span>)
  <span class="ruby-comment"># no-op</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-load_and_configure_sdoc">
            
              <b>load_and_configure_sdoc</b>()
            
            <a href="Task.html#method-i-load_and_configure_sdoc" name="method-i-load_and_configure_sdoc" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-load_and_configure_sdoc_source')" id="l_method-i-load_and_configure_sdoc_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L83" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-load_and_configure_sdoc_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 83</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">load_and_configure_sdoc</span>
  <span class="ruby-identifier">require</span> <span class="ruby-string">'sdoc'</span>

  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">title</span>    = <span class="ruby-string">'Ruby on Rails API'</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">rdoc_dir</span> = <span class="ruby-identifier">api_dir</span>

  <span class="ruby-identifier">options</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'-m'</span>  <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">api_main</span>
  <span class="ruby-identifier">options</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'-e'</span>  <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'UTF-8'</span>

  <span class="ruby-identifier">options</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'-f'</span>  <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'sdoc'</span>
  <span class="ruby-identifier">options</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'-T'</span>  <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'rails'</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">LoadError</span>
  <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">%Q(Unable to load SDoc, please add\n\n    gem 'sdoc', require: false\n\nto the Gemfile.)</span>
  <span class="ruby-identifier">exit</span> <span class="ruby-number">1</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-setup_horo_variables">
            
              <b>setup_horo_variables</b>()
            
            <a href="Task.html#method-i-setup_horo_variables" name="method-i-setup_horo_variables" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-setup_horo_variables_source')" id="l_method-i-setup_horo_variables_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a77ad86ff1be70dee945e6425b3209ab8da72cd4/railties/lib/rails/api/task.rb#L115" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-setup_horo_variables_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/api/task.rb, line 115</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">setup_horo_variables</span>
  <span class="ruby-constant">ENV</span>[<span class="ruby-string">'HORO_PROJECT_NAME'</span>]    = <span class="ruby-string">'Ruby on Rails'</span>
  <span class="ruby-constant">ENV</span>[<span class="ruby-string">'HORO_PROJECT_VERSION'</span>] = <span class="ruby-identifier">rails_version</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    